package com.spogher.components.dropdownChoices;

import java.util.List;

import org.apache.wicket.markup.html.form.DropDownChoice;
import org.apache.wicket.markup.html.form.IChoiceRenderer;

import com.spogher.bsc.data.dataobjects.Player;

public class PlayerDropDownChoice extends DropDownChoice<Player>{

	private static final long serialVersionUID = 1L;

	public PlayerDropDownChoice(String id, List<Player> choices) {
		super(id, choices, new IChoiceRenderer<Player>() {

			private static final long serialVersionUID = 1L;

			public Object getDisplayValue(Player object) {
				return object.getName();
			}

			public String getIdValue(Player object, int index) {
				return object.getName();
			}
		});
	}

}
